<template>
    <div class="sys-page">
        <template v-if="showPaymentList">
            <payment-list></payment-list>
        </template>
        <template v-else>
            <order-search></order-search>
        </template>
    </div>
</template>

<script>
    import PaymentList from './payment_list'
    import OrderSearch from './order_search';
    import { mapState, mapActions } from 'vuex'

    export default {
        name: "payment",
        components: {OrderSearch, PaymentList},

        mounted() {
            this.loadInitPageData()
        },

        methods: {
            ...mapActions({
                loadInitPageData: 'payment/loadInitPageData',
            }),
        },

        computed: {
            ...mapState({
                showPaymentList: state => state.payment.showPaymentList
            })
        }
    }
</script>

